//@author A0096794H
//This is the TaskList Class,part of the Logic Component
//The logic class will interact with this class in order to access the stored tasks
#ifndef _TASKLIST_H_
#define _TASKLIST_H_

#include <vector>
#include <string>
#include <fstream>
#include "Task.h"
#include "TimedTask.h"
#include "DeadlineTask.h"
#include "FloatingTask.h"
#include "fileProcessing.h"
#include <assert.h>
#include "constants.h"

using namespace std;

class TaskList {
private:
	static vector<Task*> listOfTasks;
	static int taskCount[];
	static Task* latestTask;
public:
	TaskList();
	~TaskList();
	static bool isEmpty();
	static int totalTaskCount();

	static int addTask(Task*);
	static void updateTask(Task *, Task *);
	static int searchTask(Task *);

	static Task* getTaskAt(int);
	static Task* getTaskOfTypeAt(TaskType, int);
	static Task* deleteTaskAt(int);
	static Task* deleteTaskOfTypeAt(TaskType, int);
	static Task* deleteTask(Task*);
	static Task* getLatestTask();
	static void setLatestTask(Task*);
	static void resetTask();
};

#endif